<template>
  <div>
    <van-swipe :autoplay="3000" class="demo-swipe">
      <van-swipe-item>1</van-swipe-item>
      <van-swipe-item>2</van-swipe-item>
      <van-swipe-item>3</van-swipe-item>
      <van-swipe-item>4</van-swipe-item>
    </van-swipe>
 
    <!-- <van-swipe :autoplay="3000">
      <van-swipe-item v-for="(image, index) in images" :key="index">
        <img v-lazy="image" />
    </van-swipe-item>
    </van-swipe> -->
  </div>
</template>

<script>
export default {
  data: () => ({

  }),
  // methods: {
  //   onChange(index) {
  //   Toast('当前 Swipe 索引：' + index);
  //   }
  // }
};
</script>

<style  scoped>
.demo-swipe {
  padding-bottom: 30px;
}
.demo-swipe .van-swipe {
  cursor: pointer;
}
.demo-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  text-align: center;
  line-height: 150px;
}
.demo-swipe .van-swipe-item:nth-child(even) {
  background-color: #39a9ed;
}
.demo-swipe .van-swipe-item:nth-child(odd) {
  background-color: #66c6f2;
}
.demo-swipe .van-swipe img {
  width: 100%;
  height: 240px;
  display: block;
  padding: 30px 60px;
  box-sizing: border-box;
  background-color: #fff;
  pointer-events: none;
}
.demo-swipe--vertical {
  height: 200px;
}
.demo-swipe--vertical .van-swipe-item {
  line-height: 200px;
}
.van-doc-demo-section {
  min-height: 100vh;
  padding-bottom: 20px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
.van-doc-demo-section__title {
  margin: 0;
  padding: 15px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  text-transform: capitalize;
}
.van-doc-demo-section__title + .van-doc-demo-block .van-doc-demo-block__title {
  padding-top: 0;
}
.van-doc-demo-block__title {
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  color: rgba(69, 90, 100, 0.6);
  padding: 40px 15px 15px;
}
.van-doc-demo-block:first-of-type .van-doc-demo-block__title {
  padding-top: 20px;
}
</style>